<?php
/**
 * Created by PhpStorm.
 * User: zhangrongxiang
 * Date: 2018/3/4
 * Time: 下午4:37
 */

//ltrim — 删除字符串开头的空白字符（或其他字符）

$hello = "Hello World";
//Hello World
echo ltrim( $hello ) . PHP_EOL;
//ello World
echo ltrim( $hello, 'H' ) . PHP_EOL;
//llo World
echo ltrim( $hello, 'eH' ) . PHP_EOL;

$text = "\t\tThese are a few words :) ...  ";
//		These are a few words :) ...
echo $text . PHP_EOL;
//These are a few words :) ...
echo ltrim( $text ) . PHP_EOL;
//These are a few words :) ...
echo ltrim( $text, "\t" ) . PHP_EOL;
//		These are a few words :) ...
echo ltrim( $text, '\t' ) . PHP_EOL;

$binary = "\x09Example string\x0A";
//	Example string
//
echo $binary . PHP_EOL;
//Example string
//
echo ltrim( $binary ) . PHP_EOL;
//Example string
//
echo ltrim( $binary, "\x00..\x1F" ) . PHP_EOL;